package com.ak;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;



public class Connect {
	public Statement connectDB(){
        String url = "jdbc:mysql://localhost:3306/text";
        String user = "root";
        String password = "hzy020418";
        Connection con;
        Statement st =null;
        try {
            Class.forName("com.mysql.jdbc.Driver");
            con = DriverManager.getConnection(url,user,password);
            st = con.createStatement();
        } catch(Exception e) {   
            e.printStackTrace();
        }
        return st;
	}

}
